PDF Scanner
A Python-based tool that converts images into high-quality PDFs with ease.
Overview
This project was designed to create a simple yet efficient PDF scanner using Python. The goal was to allow users to take an image input—whether it's a document, receipt, or note—and convert it into a clear, formatted PDF. This tool is especially useful for students, professionals, or anyone needing to digitize paper documents quickly.
Approach
I developed the scanner using Python libraries such as OpenCV and PyPDF2. The application begins by allowing users to upload an image file. It then preprocesses the image using techniques like grayscale conversion, thresholding, and edge detection to enhance text clarity. Once processed, the image is converted into a PDF and saved locally.
Challenges
One challenge was handling image distortions, especially from photos taken at awkward angles or with poor lighting. To resolve this, I implemented perspective transformation using OpenCV to straighten images. Additionally, ensuring text clarity on lower-resolution images required applying filters and adjusting contrast for optimal readability.
Results
The final product efficiently converts images into clear, professional-quality PDFs. It accurately recognizes and enhances text in various lighting conditions and angles. The scanner is lightweight, user-friendly, and can handle multiple image formats, making it versatile for everyday use.
Key Takeaways
This project sharpened my skills in image processing and Python scripting. I learned effective ways to handle image distortions and improve text recognition using basic computer vision techniques. In future iterations, I plan to integrate Optical Character Recognition (OCR) for text extraction, allowing users to edit scanned documents directly.